# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=opensmtpd-table-sqlite
pkgver=1.0
pkgrel=0
pkgdesc="OpenSMTPD SQLite tables"
url="https://github.com/OpenSMTPD/table-sqlite"
arch="all"
license="ISC"
makedepends="
	autoconf
	automake
	sqlite-dev
	"
subpackages="$pkgname-doc"
source="https://github.com/OpenSMTPD/table-sqlite/archive/$pkgver/opensmtpd-table-sqlite-$pkgver.tar.gz"
builddir="$srcdir/table-sqlite-$pkgver"
options="!check"  # upstream does not provide tests

prepare() {
	default_prepare
	./bootstrap
}

build() {
	./configure \
		--prefix=/usr \
		--mandir=/usr/share/man \
		--sysconfdir=/etc/smtpd
	make
}

package() {
	make DESTDIR="$pkgdir" smtpdir="/usr/lib/opensmtpd" install
}

sha512sums="
6cee7a00a66caacfc760c4d681ca581187098eb5c0d15319bc1d40d389e9d6691c897114e75f202a3dd1d78b827a87fcad1204915dad8f3d37e312ed8204490a  opensmtpd-table-sqlite-1.0.tar.gz
"
